﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage" %>
<%@ Import Namespace="System.Collections.Generic" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	固定位置列表
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <% 
        IEnumerable<Position> positions = (IEnumerable<Position>)ViewData["positions"];
        long factoryId = (long)ViewData["factoryId"];
        long stackId = (long)ViewData["stackId"];
        int type = (int) ViewData["type"];
    %>
    <%
        if (type == 1)
        { 
    %>
    <div id="dolphincontainer">
	    <div id="dolphinnav">
	        <ul class="top_tab">
	            <li><a href="/Stack/Index"><span>堆场管理</span></a></li>
                <li><a href="/Stack/Edit/<%=stackId %>"><span>基本信息</span></a></li>
                <li><a href="/Stack/Weather/<%=ViewData["id"] %>"><span>气象信息</span></a></li>
                <li><a href="/Stack/Stack/<%=ViewData["id"] %>"><span>堆场信息</span></a></li>
                <li><a href="/Stack/Pool/<%=ViewData["id"] %>"><span>调节水池</span></a></li>
                <li><a href="/Stack/Material/<%=ViewData["id"] %>"><span>材料信息</span></a></li>
                <li><a href="/Stack/Settle/<%=ViewData["id"] %>"><span>沉降模型</span></a></li>
                <li><a href="/Stack/Piezometer/<%=ViewData["id"] %>"><span>测压井测压仪</span></a></li>
                <li><a href="/Stack/Drain/<%=ViewData["id"] %>"><span>导渗系统</span></a></li>
                <li><a href="javascript:return(false);" class="current"><span>上传图片</span></a></li>
	        </ul>
	    </div>
	</div>
    <%
        }
        else if (type == 2)
        { 
    %>
    <div id="dolphincontainer">
	    <div id="dolphinnav">
	        <ul class="top_tab">
	            <li><a href="/Tailingpond/Index"><span>尾矿库管理</span></a></li>
                <li><a href="/Tailingpond/Edit/<%=stackId %>"><span>基本信息</span></a></li>
                <li><a href="javascript:return(false);" class="current"><span>上传图片</span></a></li>
	        </ul>
	    </div>
	</div>
    <%} %>
    <p class="sys_create_btn">
        <%= Html.ActionLink("创建位置", "AddPosition", new { factoryId = factoryId, stackId = stackId, type = type })%>
    </p>

    <table class="style_table2" cellpadding="4" cellspacing="0" border="0" style="margin-top:20px">
       <tr>
    	    <th style="width:60px; text-align:center;">编号</th>
    	    <th style="text-align:center;">位置名称</th>
            <th style="width:240px; text-align:center;">位置描述</th>
    	    <th style="width:160px; text-align:center;">首次上传时间</th>
		    <th style="width:160px; text-align:center;">最近上传时间</th>
		    <th style="width:100px; text-align:center;">操作</th>
	    </tr>
        <% 
            int i = 0;
            foreach (var item in positions)
            {
                i++; 
        %>
	    <tr onmouseover="this.className='trbgmouseover'"  onmouseout="this.className='trmouseout' ">
	        <td style="text-align:center;"><%= i %></td>
            <td> <%= item.Name %></td>
		    <td> <%= item.Description %></td>
		    <td style="text-align:center;"> <%= item.FirstUploadDate %></td>
            <td style="text-align:center;"> <%= item.LastUploadDate %></td>
		    <td style="text-align:center;">
                <%= Html.ActionLink("编辑", "EditPosition", new { positionId = item.Id })%>
            </td>
        </tr>
        <%} %>
    </table>
</asp:Content>